package com.ufox.service;

import com.ufox.entity.Cartitem;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ufox.entity.Products;
import com.ufox.entity.Result;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 优狐科技-www.hbufox.com
 * @since 2022-06-09
 */
public interface ICartitemService extends IService<Cartitem> {

    Result addCart(String userId, String prodId);

    Result clearCart(String userId);

    Result findCartByUserId(String userId);

    Result delCartById(String userId, String prodId, String pnum);


    Map<Products, Integer> findSum(String userId);

    Result delCartByIdAndInsert(String userId, String prodId, String pnum);

    Result getCountByUserId(String userId);

}
